<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/powerful.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">powerful.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="powerful_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_POWERFUL_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_POWERFUL_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="cloned_ptr_8h.html">helib/clonedPtr.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="bluestein_8h.html">helib/bluestein.h</a>&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="hypercube_8h.html">helib/hypercube.h</a>&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_double_c_r_t_8h.html">helib/DoubleCRT.h</a>&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_context_8h.html">helib/Context.h</a>&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html">   29</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_powerful_translation_indexes.html">PowerfulTranslationIndexes</a></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;{</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#af5955825cde292aa87a87fcab4dc85c7">   32</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#af5955825cde292aa87a87fcab4dc85c7">m</a>;                <span class="comment">// product of mi&#39;s</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#ad1108dd6480037533c2142f6cd9af8b6">   33</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#ad1108dd6480037533c2142f6cd9af8b6">phim</a>;             <span class="comment">// phi(m) = product of phi(mi)&#39;s</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a2d5ba64f864da4fea17da2561323ab51">   34</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a2d5ba64f864da4fea17da2561323ab51">mvec</a>;   <span class="comment">// mvec[i] = mi</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a53589e6870f3486f2c1a802132f83400">   35</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a53589e6870f3486f2c1a802132f83400">phivec</a>; <span class="comment">// phivec[i] = phi(mi)</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a8501276d33343f7d01961eddb912a92d">   36</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a8501276d33343f7d01961eddb912a92d">divvec</a>; <span class="comment">// divvec[i] = m/mi</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a66ebe8a9e072c15b7b86845cf23df204">   37</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a66ebe8a9e072c15b7b86845cf23df204">invvec</a>; <span class="comment">// invvec[i] = (m/mi)^{-1} mod mi</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#aa30d070c03d4e0d0ef4620990b560ef6">   39</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#aa30d070c03d4e0d0ef4620990b560ef6">longSig</a>;  <span class="comment">// hypercube of dimensions mi</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a4e120191050ae4b8fe00b7f662a27285">   40</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a4e120191050ae4b8fe00b7f662a27285">shortSig</a>; <span class="comment">// hypercube of dimensions phi(mi)</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a7d0ba71960c8819aa391f7b5516c5924">   42</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a7d0ba71960c8819aa391f7b5516c5924">polyToCubeMap</a>; <span class="comment">// index translation tables</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a04fe0cfdc0968d7505433d3b9bdd5667">   43</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a04fe0cfdc0968d7505433d3b9bdd5667">cubeToPolyMap</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#a456a4c0f4932c1dca523d92222d1e0a8">   44</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a456a4c0f4932c1dca523d92222d1e0a8">shortToLongMap</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#ae7af443a1c910f66b05ab3d73d81cab8">   46</a></span>&#160;  NTL::Vec&lt;NTL::ZZX&gt; <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#ae7af443a1c910f66b05ab3d73d81cab8">cycVec</a>; <span class="comment">// cycvec[i] = Phi_mi(X)</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_translation_indexes.html#abf6d504f3345912c300c4616a2ad1018">   47</a></span>&#160;  NTL::ZZX <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#abf6d504f3345912c300c4616a2ad1018">phimX</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <a class="code" href="classhelib_1_1_powerful_translation_indexes.html#aacc5b142f3938b3860b0868c834606de">PowerfulTranslationIndexes</a>(<span class="keyword">const</span> NTL::Vec&lt;long&gt;&amp; mv);</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;};</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html">   83</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_powerful_conversion.html">PowerfulConversion</a></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;{</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html">PowerfulTranslationIndexes</a>* indexes;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  NTL::zz_pContext zzpContext;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  NTL::Vec&lt;NTL::zz_pXModulus&gt; cycVec_p; <span class="comment">// cycvec[i] = Phi_mi(X)</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  NTL::zz_pXModulus phimX_p;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html#a1cdbe64828c0a7b74ec301d567e2f109">   91</a></span>&#160;  <a class="code" href="classhelib_1_1_powerful_conversion.html#a1cdbe64828c0a7b74ec301d567e2f109">PowerfulConversion</a>() : indexes(nullptr) {}</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html#a56383ff0f65b58093234e61f7f817108">   93</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_powerful_conversion.html#a56383ff0f65b58093234e61f7f817108">PowerfulConversion</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html">PowerfulTranslationIndexes</a>&amp; ind) :</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      indexes(nullptr)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <a class="code" href="classhelib_1_1_powerful_conversion.html#a443cfef5a0991a96f9c2873f4164d0e9">initPConv</a>(ind);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html#a443cfef5a0991a96f9c2873f4164d0e9">   99</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_powerful_conversion.html#a443cfef5a0991a96f9c2873f4164d0e9">initPConv</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html">PowerfulTranslationIndexes</a>&amp; ind)</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  {</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">if</span> (indexes != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;      <span class="keywordflow">return</span>; <span class="comment">// cannot re-initialize a non-nullptr object</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    indexes = &amp;ind;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    cycVec_p.SetLength(ind.<a class="code" href="classhelib_1_1_powerful_translation_indexes.html#ae7af443a1c910f66b05ab3d73d81cab8">cycVec</a>.length());</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    zzpContext.save(); <span class="comment">// store the current modulus</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = 0; i &lt; ind.<a class="code" href="classhelib_1_1_powerful_translation_indexes.html#ae7af443a1c910f66b05ab3d73d81cab8">cycVec</a>.length(); i++) {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      cycVec_p[i] =</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;          NTL::conv&lt;NTL::zz_pX&gt;(ind.<a class="code" href="classhelib_1_1_powerful_translation_indexes.html#ae7af443a1c910f66b05ab3d73d81cab8">cycVec</a>[i]); <span class="comment">// convert to zz_pXModulus</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    phimX_p = NTL::conv&lt;NTL::zz_pX&gt;(ind.<a class="code" href="classhelib_1_1_powerful_translation_indexes.html#abf6d504f3345912c300c4616a2ad1018">phimX</a>); <span class="comment">// convert to zz_pXModulus</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html#a3cb07434738988de74e88cae067a4d78">  114</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_powerful_conversion.html#a3cb07434738988de74e88cae067a4d78">restoreModulus</a>()<span class="keyword"> const </span>{ zzpContext.restore(); }</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html#ac0f9b5b0c687dc4bf0868dd6e0476d0e">  115</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; <a class="code" href="classhelib_1_1_powerful_conversion.html#ac0f9b5b0c687dc4bf0868dd6e0476d0e">getLongSig</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> indexes-&gt;<a class="code" href="classhelib_1_1_powerful_translation_indexes.html#aa30d070c03d4e0d0ef4620990b560ef6">longSig</a>; }</div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_conversion.html#a6d0b041182725002a02e91d98ac10351">  116</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; <a class="code" href="classhelib_1_1_powerful_conversion.html#a6d0b041182725002a02e91d98ac10351">getShortSig</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> indexes-&gt;<a class="code" href="classhelib_1_1_powerful_translation_indexes.html#a4e120191050ae4b8fe00b7f662a27285">shortSig</a>; }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_powerful_conversion.html#af6c9359a2dfff8c4f785f21e7960e607">powerfulToPoly</a>(NTL::zz_pX&amp; poly,</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                      <span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;NTL::zz_p&gt;</a>&amp; powerful) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_powerful_conversion.html#a6ee95105f7661f30ecaea8a387531785">polyToPowerful</a>(<a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;NTL::zz_p&gt;</a>&amp; powerful,</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                      <span class="keyword">const</span> NTL::zz_pX&amp; poly) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;};</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_d_c_r_t.html">  130</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_powerful_d_c_r_t.html">PowerfulDCRT</a></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;{</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_context.html">Context</a>&amp; context; <span class="comment">// points to the context for the DoubleCRT&#39;s</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <a class="code" href="classhelib_1_1_powerful_translation_indexes.html">PowerfulTranslationIndexes</a> indexes; <span class="comment">// modulus-independent tables</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <span class="comment">// a vector of PowerfulConversion tables, one for each modulus</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  NTL::Vec&lt;PowerfulConversion&gt; pConvVec;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <span class="comment">// product_bits[i] is the number of bits in the product of primes [0..i)</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  NTL::Vec&lt;long&gt; product_bits;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="comment">// number of excess bits needed to ensure correct conversion</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="keywordtype">long</span> to_pwfl_excess_bits;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keywordtype">long</span> to_poly_excess_bits;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <span class="keywordtype">bool</span> triv;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <a class="code" href="classhelib_1_1_powerful_d_c_r_t.html#ac02f46a76ba8a8018f8c4d976e9a5189">PowerfulDCRT</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_context.html">Context</a>&amp; _context, <span class="keyword">const</span> NTL::Vec&lt;long&gt;&amp; mvec);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_d_c_r_t.html#ab9bc67f7d9c71b383a36fd8467b61e3f">  151</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_powerful_translation_indexes.html">PowerfulTranslationIndexes</a>&amp; <a class="code" href="classhelib_1_1_powerful_d_c_r_t.html#ab9bc67f7d9c71b383a36fd8467b61e3f">getIndexTranslation</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordflow">return</span> indexes;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  }</div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classhelib_1_1_powerful_d_c_r_t.html#a7e88532818ee60714c7aee7a3fa91527">  155</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_powerful_conversion.html">PowerfulConversion</a>&amp; <a class="code" href="classhelib_1_1_powerful_d_c_r_t.html#a7e88532818ee60714c7aee7a3fa91527">getPConv</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> pConvVec.at(i); }</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="comment">// coefficients are reduced to the interval [-Q/2,Q/2], where</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  <span class="comment">// Q = product of primes in dcrt.getIndexSet();</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_powerful_d_c_r_t.html#ac85096b3361fb78ff2f33ea402a22088">dcrtToPowerful</a>(NTL::Vec&lt;NTL::ZZ&gt;&amp; powerful, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_double_c_r_t.html">DoubleCRT</a>&amp; dcrt) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_powerful_d_c_r_t.html#a329d42eb1e3c2b741b401125bc4107a9">ZZXtoPowerful</a>(NTL::Vec&lt;NTL::ZZ&gt;&amp; powerful, <span class="keyword">const</span> NTL::ZZX&amp; poly) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_powerful_d_c_r_t.html#a7f0c1273f9e392250053f05cf963a25f">powerfulToZZX</a>(NTL::ZZX&amp; poly, <span class="keyword">const</span> NTL::Vec&lt;NTL::ZZ&gt;&amp; powerful) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;};</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="comment">/********************************************************************/</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">/****************    UNUSED CODE - COMMENTED OUT   ******************/</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment">/********************************************************************/</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="preprocessor">#if 0</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#a9837bdade0e2dabb7bbf0d03a5e2e93b">computeProd</a>(<span class="keyword">const</span> Vec&lt; Pair&lt;long, long&gt; &gt;&amp; vec);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> computePhi(<span class="keyword">const</span> Pair&lt;long, long&gt;&amp; x)</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;{</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;  <span class="keywordtype">long</span> p = x.a;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  <span class="keywordtype">long</span> e = x.b;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  <span class="keywordflow">return</span> power_long(p, e - 1) * (p-1);</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;}</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="keywordtype">void</span> computePhiVec(Vec&lt;long&gt;&amp; phiVec,</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                   <span class="keyword">const</span> Vec&lt; Pair&lt;long, long&gt; &gt;&amp; factors);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a5db58bd9f9ec928c07dc95b2bd2aa26b">computeDivVec</a>(Vec&lt;long&gt;&amp; divVec, <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                   <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#aacdc9f121e0356fcc0c2d469126da20c">computeInvVec</a>(Vec&lt;long&gt;&amp; invVec,</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                   <span class="keyword">const</span> Vec&lt;long&gt;&amp; divVec, <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keywordtype">void</span> computeShortToLongMap(Vec&lt;long&gt;&amp; shortToLongMap,</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;                           <span class="keyword">const</span> CubeSignature&amp; shortSig,</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                           <span class="keyword">const</span> CubeSignature&amp; longSig);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="keywordtype">void</span> computeLongToShortMap(Vec&lt;long&gt;&amp; longToShortMap,</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;                           <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; shortToLongMap);</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160; </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="keywordtype">void</span> recursiveReduce(<span class="keyword">const</span> CubeSlice&lt;zz_p&gt;&amp; s,</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                     <span class="keyword">const</span> Vec&lt;zz_pXModulus&gt;&amp; cycVec,</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                     <span class="keywordtype">long</span> d,</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                     zz_pX&amp; tmp1,</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                     zz_pX&amp; tmp2);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="keywordtype">void</span> convertPolyToPowerful(HyperCube&lt;zz_p&gt;&amp; cube,</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                           HyperCube&lt;zz_p&gt;&amp; tmpCube,</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                           <span class="keyword">const</span> zz_pX&amp; poly,</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                           <span class="keyword">const</span> Vec&lt;zz_pXModulus&gt;&amp; cycVec,</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; polyToCubeMap,</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; shortToLongMap);</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="keywordtype">void</span> convertPowerfulToPoly(zz_pX&amp; poly,</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                           <span class="keyword">const</span> HyperCube&lt;zz_p&gt;&amp; cube,</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                           <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; shortToLongMap,</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; cubeToPolyMap,</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                           <span class="keyword">const</span> zz_pXModulus&amp; phimX);</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="comment">/********************************************************************/</span></div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;<span class="preprocessor">#if 0</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> computePow(<span class="keyword">const</span> Pair&lt;long, long&gt;&amp; x)</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;{</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;  <span class="keywordtype">long</span> p = x.a;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;  <span class="keywordtype">long</span> e = x.b;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  <span class="keywordflow">return</span> power_long(p, e);</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;}</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160; </div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;<span class="keywordtype">void</span> computePowVec(Vec&lt;long&gt;&amp; powVec,</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                   <span class="keyword">const</span> Vec&lt; Pair&lt;long, long&gt; &gt;&amp; factors);</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="keywordtype">void</span> mapIndexToPowerful(Vec&lt;long&gt;&amp; pow, <span class="keywordtype">long</span> j, <span class="keyword">const</span> Vec&lt;long&gt;&amp; phiVec);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="keywordtype">void</span> computeCycVec(Vec&lt;zz_pXModulus&gt;&amp; cycVec, <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;<span class="keywordtype">void</span> computePowerToCubeMap(Vec&lt;long&gt;&amp; polyToCubeMap,</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                           Vec&lt;long&gt;&amp; cubeToPolyMap,</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                           <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec,</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                           <span class="keyword">const</span> Vec&lt;long&gt;&amp; invVec,</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;                           <span class="keyword">const</span> CubeSignature&amp; longSig);</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="keywordtype">void</span> computeMultiEvalPoints(Vec&lt; Vec&lt;zz_p&gt; &gt;&amp; multiEvalPoints,</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;                            <span class="keyword">const</span> zz_p&amp; base,</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;                            <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;                            <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec,</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;                            <span class="keyword">const</span> Vec&lt;long&gt;&amp; phiVec);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;<span class="keywordtype">void</span> computeLinearEvalPoints(Vec&lt;zz_p&gt;&amp; linearEvalPoints,</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;                             <span class="keyword">const</span> zz_p&amp; base,</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;                             <span class="keywordtype">long</span> m, <span class="keywordtype">long</span> phim);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="keywordtype">void</span> computeCompressedIndex(Vec&lt; Vec&lt;long&gt; &gt;&amp; compressedIndex,</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;                            <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="keywordtype">void</span> computePowToCompressedIndexMap(Vec&lt;long&gt;&amp; powToCompressedIndexMap,</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;                                    <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;                                    <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec,</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;                                    <span class="keyword">const</span> Vec&lt; Vec&lt;long&gt; &gt;&amp; compressedIndex,</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                                    <span class="keyword">const</span> CubeSignature&amp; shortSig);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;<span class="keywordtype">void</span> recursiveEval(<span class="keyword">const</span> CubeSlice&lt;zz_p&gt;&amp; s,</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                   <span class="keyword">const</span> Vec&lt; Vec&lt;zz_p&gt; &gt;&amp; multiEvalPoints,</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                   <span class="keywordtype">long</span> d,</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                   zz_pX&amp; tmp1,</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;                   Vec&lt;zz_p&gt;&amp; tmp2);</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> eval(HyperCube&lt;zz_p&gt;&amp; cube,</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;         <span class="keyword">const</span> Vec&lt; Vec&lt;zz_p&gt; &gt;&amp; multiEvalPoints)</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;{</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;   zz_pX tmp1;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;   Vec&lt;zz_p&gt; tmp2;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;   recursiveEval(CubeSlice&lt;zz_p&gt;(cube), multiEvalPoints, 0, tmp1, tmp2);</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;}</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160; </div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="keywordtype">void</span> mapPowerfulToPoly(ZZX&amp; poly,</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                       <span class="keyword">const</span> Vec&lt;long&gt;&amp; pow,</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                       <span class="keyword">const</span> Vec&lt;long&gt;&amp; divVec,</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;                       <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                       <span class="keyword">const</span> ZZX&amp; phimX);</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;<span class="comment">/********************************************************************/</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="preprocessor">#if 0</span></div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="keyword">class </span>FFTHelper {</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160; </div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;  <span class="keywordtype">long</span> m;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;  zz_p m_inv;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;  zz_p root, iroot;</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;  zz_pXModulus phimx;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;  Vec&lt;bool&gt; coprime;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;  <span class="keywordtype">long</span> phim;</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160; </div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;  <span class="keyword">mutable</span> zz_pX powers, ipowers;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;  <span class="keyword">mutable</span> Vec&lt;mulmod_precon_t&gt; powers_aux, ipowers_aux;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;  <span class="keyword">mutable</span> fftRep Rb, iRb;</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;  <span class="keyword">mutable</span> fftrep_aux Rb_aux, iRb_aux;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;  <span class="keyword">mutable</span> fftRep Ra;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;  <span class="keyword">mutable</span> zz_pX tmp;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160; </div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;  FFTHelper(<span class="keywordtype">long</span> _m, zz_p x);</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160; </div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;  <span class="keywordtype">void</span> FFT(<span class="keyword">const</span> zz_pX&amp; f, Vec&lt;zz_p&gt;&amp; v) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="comment">// compute v = { f(x^i) }_{i in Z_m^*}</span></div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;  <span class="keywordtype">void</span> iFFT(zz_pX&amp; f, <span class="keyword">const</span> Vec&lt;zz_p&gt;&amp; v, <span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#ac285b2405b33a6bf1d27953c5bb89e61">normalize</a> = <span class="keyword">true</span>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="comment">// computes inverse transform. If !normalize, result is scaled by m</span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160; </div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;  <span class="keyword">const</span> zz_p&amp; get_m_inv()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_inv; }</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;  <span class="comment">// useful for aggregate normalization</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160; </div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;};</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160; </div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160; </div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="keywordtype">void</span> computeMultiEvalPoints(Vec&lt; copied_ptr&lt;FFTHelper&gt; &gt;&amp; multiEvalPoints,</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;                            <span class="keyword">const</span> zz_p&amp; base,</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;                            <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;                            <span class="keyword">const</span> Vec&lt;long&gt;&amp; powVec,</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;                            <span class="keyword">const</span> Vec&lt;long&gt;&amp; phiVec);</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160; </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;<span class="keywordtype">void</span> recursiveEval(<span class="keyword">const</span> CubeSlice&lt;zz_p&gt;&amp; s,</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;                   <span class="keyword">const</span> Vec&lt; copied_ptr&lt;FFTHelper&gt; &gt;&amp; multiEvalPoints,</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;                   <span class="keywordtype">long</span> d,</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;                   zz_pX&amp; tmp1,</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;                   Vec&lt;zz_p&gt;&amp; tmp2);</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160; </div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> eval(HyperCube&lt;zz_p&gt;&amp; cube,</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;          <span class="keyword">const</span> Vec&lt; copied_ptr&lt;FFTHelper&gt; &gt;&amp; multiEvalPoints)</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;{</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;   zz_pX tmp1;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;   Vec&lt;zz_p&gt; tmp2;</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160; </div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;   recursiveEval(CubeSlice&lt;zz_p&gt;(cube), multiEvalPoints, 0, tmp1, tmp2);</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;}</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160; </div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;<span class="keywordtype">void</span> recursiveInterp(<span class="keyword">const</span> CubeSlice&lt;zz_p&gt;&amp; s,</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;                     <span class="keyword">const</span> Vec&lt; copied_ptr&lt;FFTHelper&gt; &gt;&amp; multiEvalPoints,</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;                     <span class="keywordtype">long</span> d,</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;                     zz_pX&amp; tmp1,</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;                     Vec&lt;zz_p&gt;&amp; tmp2);</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160; </div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;<span class="keywordtype">void</span> interp(HyperCube&lt;zz_p&gt;&amp; cube,</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;        <span class="keyword">const</span> Vec&lt; copied_ptr&lt;FFTHelper&gt; &gt;&amp; multiEvalPoints);</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160; </div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160; </div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_POWERFUL_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a8501276d33343f7d01961eddb912a92d"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a8501276d33343f7d01961eddb912a92d">helib::PowerfulTranslationIndexes::divvec</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; divvec</div><div class="ttdef"><b>Definition:</b> powerful.h:36</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a2d5ba64f864da4fea17da2561323ab51"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a2d5ba64f864da4fea17da2561323ab51">helib::PowerfulTranslationIndexes::mvec</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; mvec</div><div class="ttdef"><b>Definition:</b> powerful.h:34</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_a6ee95105f7661f30ecaea8a387531785"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#a6ee95105f7661f30ecaea8a387531785">helib::PowerfulConversion::polyToPowerful</a></div><div class="ttdeci">long polyToPowerful(HyperCube&lt; NTL::zz_p &gt; &amp;powerful, const NTL::zz_pX &amp;poly) const</div><div class="ttdef"><b>Definition:</b> powerful.cpp:199</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_ad1108dd6480037533c2142f6cd9af8b6"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#ad1108dd6480037533c2142f6cd9af8b6">helib::PowerfulTranslationIndexes::phim</a></div><div class="ttdeci">long phim</div><div class="ttdef"><b>Definition:</b> powerful.h:33</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_a3cb07434738988de74e88cae067a4d78"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#a3cb07434738988de74e88cae067a4d78">helib::PowerfulConversion::restoreModulus</a></div><div class="ttdeci">void restoreModulus() const</div><div class="ttdef"><b>Definition:</b> powerful.h:114</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_a56383ff0f65b58093234e61f7f817108"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#a56383ff0f65b58093234e61f7f817108">helib::PowerfulConversion::PowerfulConversion</a></div><div class="ttdeci">PowerfulConversion(const PowerfulTranslationIndexes &amp;ind)</div><div class="ttdef"><b>Definition:</b> powerful.h:93</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html_a7e88532818ee60714c7aee7a3fa91527"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html#a7e88532818ee60714c7aee7a3fa91527">helib::PowerfulDCRT::getPConv</a></div><div class="ttdeci">const PowerfulConversion &amp; getPConv(long i) const</div><div class="ttdef"><b>Definition:</b> powerful.h:155</div></div>
<div class="ttc" id="a_double_c_r_t_8h_html"><div class="ttname"><a href="_double_c_r_t_8h.html">DoubleCRT.h</a></div><div class="ttdoc">Integer polynomials (elements in the ring R_Q) in double-CRT form.</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a04fe0cfdc0968d7505433d3b9bdd5667"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a04fe0cfdc0968d7505433d3b9bdd5667">helib::PowerfulTranslationIndexes::cubeToPolyMap</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; cubeToPolyMap</div><div class="ttdef"><b>Definition:</b> powerful.h:43</div></div>
<div class="ttc" id="aclasshelib_1_1_double_c_r_t_html"><div class="ttname"><a href="classhelib_1_1_double_c_r_t.html">helib::DoubleCRT</a></div><div class="ttdoc">Implementing polynomials (elements in the ring R_Q) in double-CRT form.</div><div class="ttdef"><b>Definition:</b> DoubleCRT.h:76</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html_ab9bc67f7d9c71b383a36fd8467b61e3f"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html#ab9bc67f7d9c71b383a36fd8467b61e3f">helib::PowerfulDCRT::getIndexTranslation</a></div><div class="ttdeci">const PowerfulTranslationIndexes &amp; getIndexTranslation() const</div><div class="ttdef"><b>Definition:</b> powerful.h:151</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html_ac02f46a76ba8a8018f8c4d976e9a5189"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html#ac02f46a76ba8a8018f8c4d976e9a5189">helib::PowerfulDCRT::PowerfulDCRT</a></div><div class="ttdeci">PowerfulDCRT(const Context &amp;_context, const NTL::Vec&lt; long &gt; &amp;mvec)</div><div class="ttdef"><b>Definition:</b> powerful.cpp:246</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_aa30d070c03d4e0d0ef4620990b560ef6"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#aa30d070c03d4e0d0ef4620990b560ef6">helib::PowerfulTranslationIndexes::longSig</a></div><div class="ttdeci">CubeSignature longSig</div><div class="ttdef"><b>Definition:</b> powerful.h:39</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="anamespacehelib_html_ac285b2405b33a6bf1d27953c5bb89e61"><div class="ttname"><a href="namespacehelib.html#ac285b2405b33a6bf1d27953c5bb89e61">helib::normalize</a></div><div class="ttdeci">void normalize(zzX &amp;f)</div><div class="ttdef"><b>Definition:</b> zzX.cpp:63</div></div>
<div class="ttc" id="anamespacehelib_html_aacdc9f121e0356fcc0c2d469126da20c"><div class="ttname"><a href="namespacehelib.html#aacdc9f121e0356fcc0c2d469126da20c">helib::computeInvVec</a></div><div class="ttdeci">void computeInvVec(NTL::Vec&lt; long &gt; &amp;invVec, const NTL::Vec&lt; long &gt; &amp;divVec, const NTL::Vec&lt; long &gt; &amp;powVec)</div><div class="ttdef"><b>Definition:</b> powerful.cpp:35</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_a6d0b041182725002a02e91d98ac10351"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#a6d0b041182725002a02e91d98ac10351">helib::PowerfulConversion::getShortSig</a></div><div class="ttdeci">const CubeSignature &amp; getShortSig() const</div><div class="ttdef"><b>Definition:</b> powerful.h:116</div></div>
<div class="ttc" id="anamespacehelib_html_a9837bdade0e2dabb7bbf0d03a5e2e93b"><div class="ttname"><a href="namespacehelib.html#a9837bdade0e2dabb7bbf0d03a5e2e93b">helib::computeProd</a></div><div class="ttdeci">long computeProd(const NTL::Vec&lt; long &gt; &amp;vec)</div><div class="ttdoc">returns \prod_d vec[d]</div><div class="ttdef"><b>Definition:</b> NumbTh.cpp:91</div></div>
<div class="ttc" id="anamespacehelib_html_a5db58bd9f9ec928c07dc95b2bd2aa26b"><div class="ttname"><a href="namespacehelib.html#a5db58bd9f9ec928c07dc95b2bd2aa26b">helib::computeDivVec</a></div><div class="ttdeci">void computeDivVec(NTL::Vec&lt; long &gt; &amp;divVec, long m, const NTL::Vec&lt; long &gt; &amp;powVec)</div><div class="ttdef"><b>Definition:</b> powerful.cpp:22</div></div>
<div class="ttc" id="ahypercube_8h_html"><div class="ttname"><a href="hypercube_8h.html">hypercube.h</a></div><div class="ttdoc">Hypercubes and their slices.</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a4e120191050ae4b8fe00b7f662a27285"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a4e120191050ae4b8fe00b7f662a27285">helib::PowerfulTranslationIndexes::shortSig</a></div><div class="ttdeci">CubeSignature shortSig</div><div class="ttdef"><b>Definition:</b> powerful.h:40</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a66ebe8a9e072c15b7b86845cf23df204"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a66ebe8a9e072c15b7b86845cf23df204">helib::PowerfulTranslationIndexes::invvec</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; invvec</div><div class="ttdef"><b>Definition:</b> powerful.h:37</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a53589e6870f3486f2c1a802132f83400"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a53589e6870f3486f2c1a802132f83400">helib::PowerfulTranslationIndexes::phivec</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; phivec</div><div class="ttdef"><b>Definition:</b> powerful.h:35</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a7d0ba71960c8819aa391f7b5516c5924"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a7d0ba71960c8819aa391f7b5516c5924">helib::PowerfulTranslationIndexes::polyToCubeMap</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; polyToCubeMap</div><div class="ttdef"><b>Definition:</b> powerful.h:42</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_a456a4c0f4932c1dca523d92222d1e0a8"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#a456a4c0f4932c1dca523d92222d1e0a8">helib::PowerfulTranslationIndexes::shortToLongMap</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; shortToLongMap</div><div class="ttdef"><b>Definition:</b> powerful.h:44</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_af5955825cde292aa87a87fcab4dc85c7"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#af5955825cde292aa87a87fcab4dc85c7">helib::PowerfulTranslationIndexes::m</a></div><div class="ttdeci">long m</div><div class="ttdef"><b>Definition:</b> powerful.h:32</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_a443cfef5a0991a96f9c2873f4164d0e9"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#a443cfef5a0991a96f9c2873f4164d0e9">helib::PowerfulConversion::initPConv</a></div><div class="ttdeci">void initPConv(const PowerfulTranslationIndexes &amp;ind)</div><div class="ttdef"><b>Definition:</b> powerful.h:99</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html_a7f0c1273f9e392250053f05cf963a25f"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html#a7f0c1273f9e392250053f05cf963a25f">helib::PowerfulDCRT::powerfulToZZX</a></div><div class="ttdeci">void powerfulToZZX(NTL::ZZX &amp;poly, const NTL::Vec&lt; NTL::ZZ &gt; &amp;powerful) const</div><div class="ttdef"><b>Definition:</b> powerful.cpp:354</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_aacc5b142f3938b3860b0868c834606de"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#aacc5b142f3938b3860b0868c834606de">helib::PowerfulTranslationIndexes::PowerfulTranslationIndexes</a></div><div class="ttdeci">PowerfulTranslationIndexes(const NTL::Vec&lt; long &gt; &amp;mv)</div><div class="ttdef"><b>Definition:</b> powerful.cpp:152</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_af6c9359a2dfff8c4f785f21e7960e607"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#af6c9359a2dfff8c4f785f21e7960e607">helib::PowerfulConversion::powerfulToPoly</a></div><div class="ttdeci">long powerfulToPoly(NTL::zz_pX &amp;poly, const HyperCube&lt; NTL::zz_p &gt; &amp;powerful) const</div><div class="ttdef"><b>Definition:</b> powerful.cpp:223</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_ac0f9b5b0c687dc4bf0868dd6e0476d0e"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#ac0f9b5b0c687dc4bf0868dd6e0476d0e">helib::PowerfulConversion::getLongSig</a></div><div class="ttdeci">const CubeSignature &amp; getLongSig() const</div><div class="ttdef"><b>Definition:</b> powerful.h:115</div></div>
<div class="ttc" id="abluestein_8h_html"><div class="ttname"><a href="bluestein_8h.html">bluestein.h</a></div><div class="ttdoc">declaration of BluesteinFFT(x, n, root, powers, powers_aux, Rb):</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html"><div class="ttname"><a href="classhelib_1_1_cube_signature.html">helib::CubeSignature</a></div><div class="ttdoc">Holds a vector of dimensions for a hypercube and some additional data.</div><div class="ttdef"><b>Definition:</b> hypercube.h:28</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html_a1cdbe64828c0a7b74ec301d567e2f109"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html#a1cdbe64828c0a7b74ec301d567e2f109">helib::PowerfulConversion::PowerfulConversion</a></div><div class="ttdeci">PowerfulConversion()</div><div class="ttdef"><b>Definition:</b> powerful.h:91</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html_ac85096b3361fb78ff2f33ea402a22088"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html#ac85096b3361fb78ff2f33ea402a22088">helib::PowerfulDCRT::dcrtToPowerful</a></div><div class="ttdeci">void dcrtToPowerful(NTL::Vec&lt; NTL::ZZ &gt; &amp;powerful, const DoubleCRT &amp;dcrt) const</div><div class="ttdef"><b>Definition:</b> powerful.cpp:393</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html">helib::HyperCube</a></div><div class="ttdoc">A multi-dimensional cube.</div><div class="ttdef"><b>Definition:</b> hypercube.h:221</div></div>
<div class="ttc" id="a_context_8h_html"><div class="ttname"><a href="_context_8h.html">Context.h</a></div><div class="ttdoc">Keeps the parameters of an instance of the cryptosystem.</div></div>
<div class="ttc" id="aclasshelib_1_1_context_html"><div class="ttname"><a href="classhelib_1_1_context.html">helib::Context</a></div><div class="ttdoc">Maintaining the parameters.</div><div class="ttdef"><b>Definition:</b> Context.h:58</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_conversion_html"><div class="ttname"><a href="classhelib_1_1_powerful_conversion.html">helib::PowerfulConversion</a></div><div class="ttdoc">Conversion between powerful representation in R_m/(q) and zz_pX.</div><div class="ttdef"><b>Definition:</b> powerful.h:84</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html_a329d42eb1e3c2b741b401125bc4107a9"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html#a329d42eb1e3c2b741b401125bc4107a9">helib::PowerfulDCRT::ZZXtoPowerful</a></div><div class="ttdeci">void ZZXtoPowerful(NTL::Vec&lt; NTL::ZZ &gt; &amp;powerful, const NTL::ZZX &amp;poly) const</div><div class="ttdef"><b>Definition:</b> powerful.cpp:309</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_abf6d504f3345912c300c4616a2ad1018"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#abf6d504f3345912c300c4616a2ad1018">helib::PowerfulTranslationIndexes::phimX</a></div><div class="ttdeci">NTL::ZZX phimX</div><div class="ttdef"><b>Definition:</b> powerful.h:47</div></div>
<div class="ttc" id="acloned_ptr_8h_html"><div class="ttname"><a href="cloned_ptr_8h.html">clonedPtr.h</a></div><div class="ttdoc">Implementation of smart pointers with &quot;deep cloning&quot; semantics.</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html">helib::PowerfulTranslationIndexes</a></div><div class="ttdoc">Holds index tables for translation between powerful and zz_pX.</div><div class="ttdef"><b>Definition:</b> powerful.h:30</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_translation_indexes_html_ae7af443a1c910f66b05ab3d73d81cab8"><div class="ttname"><a href="classhelib_1_1_powerful_translation_indexes.html#ae7af443a1c910f66b05ab3d73d81cab8">helib::PowerfulTranslationIndexes::cycVec</a></div><div class="ttdeci">NTL::Vec&lt; NTL::ZZX &gt; cycVec</div><div class="ttdef"><b>Definition:</b> powerful.h:46</div></div>
<div class="ttc" id="aclasshelib_1_1_powerful_d_c_r_t_html"><div class="ttname"><a href="classhelib_1_1_powerful_d_c_r_t.html">helib::PowerfulDCRT</a></div><div class="ttdoc">Conversion between powerful representation, DoubleCRT, and ZZX.</div><div class="ttdef"><b>Definition:</b> powerful.h:131</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
